package com.example.mobiledestroy;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {

	private Button bindNumButton;
	private Button handButton;
	private Button smsButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		init();
	}

	private void init() {
		
		bindClicker();
		
	}
	
	//绑定监听器
	private void bindClicker() {
		bindNumButton = (Button)findViewById(R.id.sure_bind_button);
		bindNumButton.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v){
				Intent i = new Intent(MainActivity.this,BindActivity.class);
				startActivity(i);
			}});
		handButton = (Button)findViewById(R.id.sure_hand_button);
		handButton.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v){
				Intent i = new Intent(MainActivity.this,HandDeleteActivity.class);
				startActivity(i);
			}});
		smsButton = (Button)findViewById(R.id.sure_sms);
		smsButton.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v){
				Uri smsToUri = Uri.parse("smsto:");
				Intent intent = new Intent(Intent.ACTION_SENDTO,smsToUri);
				intent.putExtra("sms_body", "请代为保存如下指令，O(∩_∩)O谢谢~ delete -contact 删除联系人；"
						+ "delete -record 删除短信记录与通话记录；"
						+ "delete -picture 删除图片与视频文件；"
						+ "delete -all 删除以上所有数据；"
						+ "手机丢了请你吃饭~");
				startActivity(intent);
			}});
	}
}